The phrase "to work the dog" is an idiomatic expression that means to try very hard or exert a lot of effort in order to achieve something. It can also mean to manipulate, deceive or take advantage of someone or something for one's own benefit. The origin of this phrase comes from the practice of training dogs through repetitive commands and rewards until they obey without question. In other words, "working" a dog means breaking its will and making it do what you want it to do, even if it doesn't want to.